<template>
	<view class="nav_top">
		<tt-bar leftIcon="icon-back" title="核销历史" titleAlign="left"></tt-bar>
		<view class="hexiaolist" v-for="(item,index) in hexiaolist" :key="index">
			<text class="shopping">{{item.storeName}}</text>
			<view class="hexiaoTime">
				<text>{{item.tryTime}}</text>
				<text>已核销</text>
			</view>
		</view>
		<!-- 当请求的来的数据为空时显示 -->
		<emptyBox v-if="hexiaolist.length<1"></emptyBox>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				hexiaolist:[],	
				refoundData:{}				
			};
		},
		methods: {
			//获取核销历史的数据
			getHexiaolista(orderNo) {	
				
				this.$store.dispatch("apiGetHexiaoList",{
					orderNo:orderNo.toString()
				}).then(res => {
					console.log(res)
					this.hexiaolist = res.data.data
																		
				})
			}
		},
		onLoad(option){			
		    var orderNo = option.oid			
			this.getHexiaolista(orderNo)
		}
	};
</script>

<style lang="less">
	.hexiaolist {
		width: 100%;
		height: 110rpx;

		padding: 10rpx 20rpx 0 20rpx;
		border-bottom: 1px solid #ccc;

		.shopping {
			font-size: 30rpx;
		}

		.hexiaoTime {
			font-size: 20rpx;
			display: flex;
			justify-content: space-between;
			color: #999;
		}
	}
</style>
